/*
 * 英才汇硕信息科技有限公司 拥有本软件版权 2021 并保留所有权利。
 * Copyright 2021, YCHS Information&Science Techology Co.,Ltd,
 * All right reserved.
 */
package com.ychs.lawyerback.mapper;

import com.ychs.lawyerback.dto.LawyerOptDTO;
import com.ychs.lawyerback.dto.LawyerQueryDTO;
import com.ychs.lawyerback.pojo.LawyerEntity;
import com.ychs.lawyerback.vo.LawyerQueryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mayujing
 * @version 1.0
 */
@Mapper
public interface LawyerMapper {

    /**
     * 根据条件查询律师信息
     * @param lawyerQueryDTO
     * @return
     */
    List<LawyerQueryVo> getLawyersByCondition(LawyerQueryDTO lawyerQueryDTO);

    /**
     * 根据条件查询总条数
     * @param lawyerQueryDTO
     * @return
     */
    int getCountByCondition(LawyerQueryDTO lawyerQueryDTO);

    int countByIdCard(String idCard);

    int countByLicenseNo(String licenseNo);

    int addLawyer(LawyerEntity lawyerEntity);

    LawyerEntity getLawyerById(long lawyerId);

    int editLawyer(LawyerEntity lawyerEntity);

    int deleteLawyer(List<Long> ids);

    LawyerQueryVo selectBaseInfoById(Long lawyerId);


    void updateFileUrl( @Param("lawyerId") Long lawyerId,
                        @Param("fieldName") String fieldName,
                        @Param("fileUrl") String fileUrl);

    LawyerQueryVo selectByUserId(Long userId);
}
